package com.hongyue.zuoTi4;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入网址");
        String a = sc.nextLine();
        int q = 0;
        int d = 0;
        for (int i = 0; i < a.length(); i++) {
            if (a.charAt(i) == '@') {
                q++;
            } else if (a.charAt(i) == '.') {
                d++;
            }
        }
        if (q >= 1 && d >= 1) {
            System.out.println("输入正确");
        } else {
            System.out.println("输入错误");
        }
    }
}
